import React from 'react';
import PropTypes from 'prop-types';
import { Checkbox } from 'antd';
import './index.less';

const OnedayDetectionIgnore = props => {
  const { handleIgnoreTypeChange, handleJumpWhitelist, prefixCls } = props;

  return (
    <div className={`${prefixCls}-item`}>
      <span className={`${prefixCls}-item-sub-title`}>禁扫目标</span>
      <div className={`${prefixCls}-item-sub-body`}>
        <Checkbox value={'whitelist'} defaultChecked={true} onChange={handleIgnoreTypeChange}>
          启用
        </Checkbox>
        <a onClick={handleJumpWhitelist}>去配置</a>
      </div>
    </div>
  );
};

OnedayDetectionIgnore.propTypes = {
  handleIgnoreTypeChange: PropTypes.func,
  handleJumpWhitelist: PropTypes.func,
  ignoreType: PropTypes.object,
  prefixCls: PropTypes.string
};

export default OnedayDetectionIgnore;
